Skip to content

feat(prose): DLT-3245 new component#1169

Draft
Francis Rupert (francisrupert) wants to merge 15 commits intonextfrom
prose-component
Draft

feat(prose): DLT-3245 new component#1169
Francis Rupert (francisrupert) wants to merge 15 commits intonextfrom
prose-component

Conversation

@francisrupert
Copy link
Copy Markdown
Contributor

@francisrupert Francis Rupert (francisrupert) commented Apr 4, 2026

image

🛠️ Type Of Change

  • Feature

📖 Jira Ticket

DLT-3245

📖 Description

Add DtProse, a new container component that solely styles raw HTML to styled content. It can be thought of as a scoped CSS reset with opinionated style defaults, restoring the margins, list styles, heading sizes, and block-level formatting that the Dialtone reset strips away.

  • Styles native HTML content elements within a scoped @layer dialtone.components container
  • size prop (100, 200, 300) to shift scale of typography and spacing proportionally
  • density prop (100, 200, 300) controls line-height independently from size
  • CSS custom properties (--prose-*) enable consumer overrides without writing selectors
  • Content validation strips non-essential attributes from inner elements and warns on disallowed elements (form controls, Vue components) in dev mode
  • Does not parse markdown, provide syntax highlighting, or style Dialtone Vue components inside the slot — plain HTML only.

📦 Cross-Package Impact

Package Changes
dialtone-css New prose.less with .d-prose class, size/density modifiers
dialtone-vue New DtProse component with size/density props, content validation, unit tests
dialtone-documentation New component page with combinator, 11 per-element demos, variant examples
combinator New variants_prose.js with 11 element-specific presets

📝 Checklist

For all PRs:

  • I have ensured no private Dialpad links or info are in the code or pull request description.
  • I have reviewed my changes.
  • I have added all relevant documentation.
  • I have considered the performance impact of my change.

For all Vue changes:

  • I have added / updated unit tests.
  • I have validated components with a screen reader.
  • I have validated components keyboard navigation.

For all CSS changes:

  • I have used design tokens whenever possible.
  • I have considered how this change will behave on different screen sizes.
  • I have visually validated my change in light and dark mode.
  • I have used gap or flexbox properties for layout instead of margin whenever possible.

If new component:

  • I am exporting any new components or constants:
    • from the index.js in the component directory.
    • from the index.js in the root (packages/dialtone-vue).
  • I have added the styles for the new component to the packages/dialtone-css package.
  • I have created a page for the new component on the documentation site in apps/dialtone-documentation.
  • I have added the new component to common/components_list.js
  • I have created a component story in storybook
  • I have created story / stories for any relevant component variants in storybook
  • I have created a docs page for the component in storybook.
  • I have checked that changing all props/slots via the UI in storybook works as expected.
prose.mp4

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

Please add either the visual-test-ready or no-visual-test label to this PR depending on whether you want to run visual tests or not.
It is recommended to run visual tests if your PR changes any UI. ‼️

@francisrupert Francis Rupert (francisrupert) added the no-visual-test Add this tag when the PR does not need visual testing label Apr 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

✔️ Deploy previews ready!
😎 Dialtone documentation preview: https://dialtone.dialpad.com/deploy-previews/pr-1169/
😎 Dialtone-vue preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-1169/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-visual-test Add this tag when the PR does not need visual testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant